# -*- coding: utf-8 -*-

'''
@project : AIGateWay_fastapi
@FileName: t_face_detail_log
@Author  :linych 
@Time    :2020/12/16 20:59
@Desc  : 
'''





import ailog

from Core import mysql_log_loop


async def insert_face_detail(seqid,index_name,faceQuality,new_index,new_face,create_time,visitorId,fileUrl):
    try:

        ailog.info('insert_detail')


        sql = "insert into ai_face_detail_record (seqid,index_name,faceQuality,new_index,new_face,create_time,visitorId,fileUrl) \
           VALUES ('{}','{}','{}',{},{},'{}','{}','{}')".format(seqid,index_name,faceQuality,new_index,new_face,create_time,visitorId,fileUrl)

        await mysql_log_loop.db_util.execute(sql)
        ailog.debug(sql)
    except Exception as e:
        ailog.error('Mysql error : {}'.format(e))

